package com.example.treeHole.dao;

import com.example.treeHole.vo.ArticleReply;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ArticleReplyMapper {
    int deleteByPrimaryKey(String id);

    int insert(ArticleReply record);

    int insertSelective(ArticleReply record);

    ArticleReply selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(ArticleReply record);

    int updateByPrimaryKey(ArticleReply record);


    /**
     * 根据文章id查询评论数量
     * @param articleId
     * @return
     */
    List<Map<String, Object>> findArticleReplyCount(List<String> articleIds);


    List<ArticleReply> findReplyByAId(@Param("articleId") String articleId);

    List<ArticleReply> findAll();

    /**
     * 根据文章IDs 查询 文章ID 和对应的回复数量 和当前人是否点赞
     * @param articleIds
     * @return
     */
    List<Map<String, Object>> findARCountByList(@Param("articleIds")List<String> articleIds,@Param("uId") String currentId);



    //List<Map<String, String>> findARCountByList();



}